package com.xander.qqdatabase.service;

import com.xander.qqdatabase.entity.User;

/**
 * @author 叶振东
 * @date 2019-01-10
 */
public interface UserService {
    /**
     * 根据用户名获取用户
     *
     * @param userId
     * @return User
     * @author yezhendong
     * @date 2019-01-10
     */
    User getUserByUserId(String userId);

    /**
     * 根据用户名获取用户
     *
     * @param username
     * @return User
     * @author yezhendong
     * @date 2019-01-10
     */
    User getUserByUsername(String username);

    /**
     * 根据参数获取用户
     *
     * @param user
     * @return User
     * @author yezhendong
     * @date 2019-01-10
     */
    User getUser(User user);

    /**
     * 注册用户
     *
     * @param username
     * @param password
     * @return void
     * @author yezhendong
     * @date 2019-01-10
     */
    User login(String username, String password);

    /**
     * 注册用户
     *
     * @param user
     * @return void
     * @author yezhendong
     * @date 2019-01-10
     */
    void register(User user, String code, String verCode);
}
